package com.shejimoshi.单例模式.深浅克隆.深克隆.使用序列化进行深度复制;

public class Test {
    public static void main(String[] args) {
        Person person = new Person(1, "喜欢吃东西");
        Man manOld = new Man("金玉宝", person);

        Man manNew = CloneUtils.clone(manOld);
        System.out.println(manOld);
        System.out.println(manNew);

        System.out.println("《《《《《《《《《修改后》》》》》》》》");
        person.setHobby("喜欢旅游");

        System.out.println(manOld);
        System.out.println(manNew);
    }
}
